package com.example.demo.设计模式.原型模式;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @description:
 * @projectName:demo
 * @see:设计模式.原型模式
 * @author:袁成龙
 * @createTime:2020/10/13 8:44
 * @version:1.0
 */
public class YuanXing {

    public static void main(String[] args) throws CloneNotSupportedException, IOException, ClassNotFoundException {

        YuanXingTest xingTest = new YuanXingTest();

        List<Map<String,List<String>>> maps = new ArrayList<>();

        xingTest.setMaps(maps);
        xingTest.setI(7);

        /*YuanXingTest clone = xingTest.clone();
*/

      /*  System.out.println(xingTest.getMaps()==clone.getMaps());

        System.out.println(xingTest.getI()==clone.getI());
*/

        YuanXingTest deptclone = xingTest.deptclone();

        System.out.println(xingTest.getMaps()==deptclone.getMaps());

        System.out.println(xingTest.getI()==deptclone.getI());


    }

}